home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / Direct.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-16  |  2.1 KB  |  102 lines

  1. /* Copyright (C) 1986-2001 by Digital Mars. $Revision: 1.1.1.1 $ */
  2. #if __SC__ || __RCC__
  3. #pragma once
  4. #endif
  5.  
  6. #ifndef __DIRECT_H
  7. #define __DIRECT_H 1
  8.  
  9. #if __OS2__ && __INTSIZE == 4
  10. #define __CLIB    __stdcall
  11. #else
  12. #define __CLIB    __cdecl
  13. #endif
  14.  
  15. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  16. #ifndef _CRTAPI1
  17. #define _CRTAPI1 __cdecl
  18. #endif
  19.  
  20.  
  21. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  22. #ifndef _CRTAPI2
  23. #define _CRTAPI2 __cdecl
  24. #endif
  25.  
  26. /* Define CRTIMP */
  27. #ifndef _CRTIMP
  28. #if defined(_WIN32) && defined(_DLL)
  29. #define _CRTIMP  __declspec(dllimport)
  30. #else
  31. #define _CRTIMP
  32. #endif
  33. #endif
  34.  
  35. #if __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #ifndef __NT__
  40. #define MAXPATH        80
  41. #define MAXDRIVE    3
  42. #define MAXDIR        66
  43. #define MAXFILE        9
  44. #define MAXEXT        5
  45. #else
  46. #define MAXPATH 260
  47. #define MAXDIR 260
  48. #define MAXDRIVE 260
  49. #define MAXFILE 260
  50. #define MAXEXT 260
  51. #endif
  52.  
  53. #ifndef ZTC_COMPAT
  54. #define WILDCARDS 0x01
  55. #endif
  56.  
  57. #define EXTENSION 0x02
  58. #define FILENAME  0x04
  59. #define DIRECTORY 0x08
  60. #define DRIVE      0x10
  61.  
  62. #if !defined(_WCHAR_T_DEFINED)
  63. typedef unsigned short wchar_t;
  64. #define _WCHAR_T_DEFINED 1
  65. #endif
  66.  
  67. typedef unsigned size_t;
  68.  
  69. char *searchpath(const char *);
  70. void fnmerge( char  *,const char  *,const char  *, const char  *,const char  *);
  71. int fnsplit( const char  *,char  *,char  *,char  *,char  *);
  72.  
  73. char * __cdecl getcwd(char *,size_t);
  74. char * __CLIB _getdcwd(int drive,char *Pbuf,int PbufLen);
  75. int __CLIB getcurdir(int drive,char *dir);
  76. int __cdecl _chdrive(int);
  77. int __cdecl _getdrive(void);
  78. int __cdecl chdir(const char *);
  79. #if !(M_UNIX || M_XENIX)
  80. int __cdecl mkdir(const char *);
  81. #endif
  82. int __cdecl rmdir(const char *);
  83. #define _chdir(direc) chdir(direc)
  84. #define _mkdir mkdir
  85. #define _rmdir rmdir
  86. #define _getcwd(direc,len) getcwd(direc,len)
  87. #define getdrive _getdrive
  88.  
  89. #ifdef __NT__
  90. wchar_t * __CLIB _wgetcwd(wchar_t *, size_t);
  91. wchar_t * __CLIB _wgetdcwd(int, wchar_t *, int);
  92. int __CLIB _wchdir(const wchar_t *);
  93. int __CLIB _wmkdir(const wchar_t *);
  94. int __CLIB _wrmdir(const wchar_t *);
  95. #endif
  96.  
  97. #if __cplusplus
  98. }
  99. #endif
  100.  
  101. #endif
  102.